package com.wanxi.web.controller;

import com.wanxi.login.domain.dto.LoginDefaultDto;
import com.wanxi.login.domain.dto.LoginDto;
import com.wanxi.login.domain.dto.LoginParamsDto;
import com.wanxi.login.domain.entity.TokenVo;
import com.wanxi.login.domain.result.LoginResult;
import com.wanxi.web.service.login.impl.LoginWebServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * ClassName: AdminInfoController
 * Description: 管理员基本信息，包括登陆
 * date: 2022/1/17 9:19
 *
 * @author lxl
 * @version 1.0
 * @since JDK 1.8
 */
@Api(tags = "管理员登录")
@RestController
@RequestMapping("admin/info")
public class AdminInfoController {

    @Resource
    private LoginWebServiceImpl service;

    @ApiOperation(value = "登陆接口")
    @PostMapping("/login")
   public LoginResult<TokenVo> login( LoginParamsDto loginParamsDto){
        return service.login(loginParamsDto);
    }


}
